package org.lanqiao.practice_1;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import org.junit.Test;

public class Pro_1 {
	@Test
	public void test_1(){
		String str="12:15:18:";
		String[]strarray=str.split(":");
		for(int i=0;i<strarray.length;i++){
			System.out.println(strarray.length);
			System.out.print(strarray[i]);
		}
	}

	@Test
	public void test_2(){
		String []array=new String[]{"1","2","3","4"};
		ListAll(Arrays.asList(array),"");
	}

	private void ListAll(List<String> candidate, String prefix) {
		System.out.println(prefix);
		for(int i=0;i<candidate.size();i++){
			List temp=new LinkedList<>(candidate);
			ListAll(temp,prefix+temp.remove(i));
		}
	}
}
